﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Survey.Entity;
using Survey.DataAccessLayer.Data;

namespace Survey.DataAccessLayer
{
    public class QuestionnaireAccessor : Accessor<Questionnaire>
    {
        public QuestionnaireAccessor() : base(new SurveyDbContext()) { }
        public Questionnaire GetQuestionnaire(int id)
        {
            var q = Select(questionnaire => questionnaire.Id == id);
            return q.Single();
        }
    }
}
